package reflex;

import java.lang.reflect.Method;

public class MyMethod {
    public static void main(String[] args) {
        try {
            Class<?> aClass = Class.forName("reflex.Student");
//            Method[] declaredMethods = aClass.getDeclaredMethods();
//            for (Method m:declaredMethods
//                 ) {
//                System.out.println(m);
//            }
            Object o = aClass.getConstructor().newInstance();
            Method getAa = aClass.getDeclaredMethod("getAa", String.class);
            getAa.setAccessible(true);
            getAa.invoke(o,"aaaa");
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
